package org.dtrd.modules.patient.entity.bean.report;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.config.system.Constant;
import org.dtrd.modules.patient.entity.po.DtrdEntRdReport;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author qr
 * @date 2022/4/8 12:50
 */
@ApiModel(value = "更新首诊报告请求")
@Getter
@Setter
public class ReportFirstUpdateRequest {

    @ApiModelProperty(value = "报告id", required = true)
    private Integer reportId;

    @ApiModelProperty(value = "饮食", required = true)
    @NotBlank
    private String diet;

    @ApiModelProperty(value = "运动", required = true)
    @NotBlank
    private String sport;

    @ApiModelProperty(value = "用药", required = true)
    @NotBlank
    private String medical;

    @ApiModelProperty(value = "生活方式", required = true)
    @NotBlank
    private String lifeway;

    @ApiModelProperty(value = "监测设备列表")
    private String monitoringEquipment;

    @ApiModelProperty(value = "营养餐包列表")
    private String nutritionPackage;

    @ApiModelProperty(value = "报告单")
    private String reportPictures;

    @ApiModelProperty(value = "发布状态")
    @NotNull
    private Integer publishStatus;

    public ReportFirstUpdateRequest init() {
        diet = "";
        sport = "";
        medical = "";
        lifeway = "";
        return this;
    }

    public ReportFirstUpdateRequest makeJson() {
        ReportFirstUpdateRequest request = new ReportFirstUpdateRequest();
        request.setDiet(diet);
        request.setLifeway(lifeway);
        request.setSport(sport);
        request.setMedical(medical);
        request.setMonitoringEquipment(monitoringEquipment);
        request.setNutritionPackage(nutritionPackage);
        request.setReportPictures(reportPictures);
        return request;
    }
}
